<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">

<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<title>DOMAssistant module - DOM Assistant, the modular lightweight JavaScript library</title>
	<style type="text/css">
		@import url("css/domassistant.css");
	</style>
	<!--[if lt IE 7]>
		<link rel="stylesheet" href="css/ie.css" type="text/css">
	<![endif]-->
</head>

<body>
	
	<div id="container">
		<div id="inner-container">
			<div id="main-content">
				<h1><a href="index.htm"><span></span>DOMAssistant</a></h1>
				<h2>DOMAssistant module</h2>
				<p>Here you will find a general documentation for the DOMAssistant module.</p>
				<h3 id="domass-module">Module documentation</h3>
				<p>The core DOMAssistant module is required and it lays the groundwork for all DOMAssistant functionality. It consists of core functionality and a few important methods to work with. These methods are:</p>
				
				<h4>Methods</h4>
				<ul>
					<li><a href="#dollar">$</a></li>
					<li><a href="#elmsByClass">elmsByClass</a></li>
					<li><a href="#elmsByAttribute">elmsByAttribute</a></li>
				</ul>
				
				<h4 id="dollar"><code>$()</code></h4>
				<p>The $ method is used to get a reference to an element. It supports either one or several string containing the id of the element(s) you want a reference too, or getting an already established element reference. If it gets an element reference, it will return that same referece, but with the difference that it has applied all extra methods to it.</p>
				<h5>Parameters</h5>
				<p>Send in one or several strings with the <code>id</code> of the element(s) you're looking, or a single element reference.</p>
				
				<h5>Example calls</h5>
<pre><code>
// Returns element reference
$("container");
// Return an array of element references
$("container", "navigation", "content");
// Returns element reference
$(elementReference);
</code></pre>

				<h4 id="elmsByClass"><code>elmsByClass(className, tag)</code></h4>
				<p>Adds support to every element for getting elements based on their <code>className</code>. The method has a required parameter which is the desired <code>className</code>, and one optional if you want to limit the search to a certain tag. It also per default applies this method to the <code>document</code> element.</p>

				 <h5>Parameters</h5>
			 	<dl>
					<dt>className</dt>
					<dd>Class name to search for. Required.</dd>
					<dt>tag</dt>
					<dd>Only search elements that have this tag name. Optional.</dd>
				</dl>
				 
				 <h5>Example calls</h5>
<pre><code>
// All calls return an array of element references
$("container").elmsByClass("mandatory");
$("container").elmsByClass("external-link", "a");
</code></pre>

				<h4 id="elmsByAttribute"><code>elmsByAttribute(attr, attrVal, tag)</code></h4>
				<p>Adds support to every element for getting elements based on if they have a certain attribute. You can also specify if that attribute should have a speific value and if you want to limit the search to a certain tag. Only the first parameter specifying the attribute is required. It also per default applies this method to the <code>document</code> element.</p>

				<h5>Parameters</h5>
			 	<dl>
					<dt>attr</dt>
					<dd>Attribute name to look for. Required.</dd>
					<dt>attrVal</dt>
					<dd>Value that the desired attribute has to have. Optional. Use wildcard character ("*") if you want any attribute value but still want to specify <code>tag</code>.</dd>
					<dt>tag</dt>
					<dd>Only search elements that have this tag name. Optional.</dd>
				</dl>
				 
				 <h5>Example calls</h5>
<pre><code>
// All calls return an array of element references
$("container").elmsByAttribute("href");
$("container").elmsByAttribute("name", "subscription");
$("container").elmsByAttribute("type", "text", "input");
</code></pre>
			
			</div>
			
			<div id="navigation">
				<div id="navigation-inner">
					<p><em>Current version is 2.0, released September 19th 2007.</em></p>
					<p><em>November 8th 2007 update: <code>elmsByAttribute</code> update. <a href="Release-notes.txt">Release notes</a></em></p>
					<h3>Information</h3>
					<ul>
						<li><a href="index.htm">Introduction</a></li>
						<li><a href="compatibility.htm">Compatibility</a></li>
						<li><a href="demo.htm">Demo</a></li>
					</ul>
				
					<h3>Module documentation</h3>
					<ul>
						<li><a href="modules-domassistant.htm" class="selected">DOMAssistant</a></li>
						<li><a href="modules-domassistant-ajax.htm">DOMAssistantAJAX</a></li>
						<li><a href="modules-domassistant-content.htm">DOMAssistantContent</a></li>
						<li><a href="modules-domassistant-css.htm">DOMAssistantCSS</a></li>
						<li><a href="modules-domassistant-events.htm">DOMAssistantEvents</a></li>						
						<li><a href="modules-domassistant-load.htm">DOMAssistantLoad</a></li>
						<li><a href="documentation/DOMAssistant-documentation.pdf">Complete documentation (PDF)</a></li>
						<li><a href="documentation/DOMAssistant-diagram.pdf">Diagram with all modules and methods (PDF)</a></li>
					</ul>
	
					<h3>Downloads</h3>
					
					<h4>Complete files with all modules</h4>
					<ul>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantCompressed-2.0.js&amp;can=2&amp;q=#makechanges" title="Download DOMAssistantCompressed.js at Google code">Compressed (10.5 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantComplete-2.0.js&amp;can=2&amp;q=#makechanges" title="Download DOMAssistantComplete.js at Google code">Uncompressed (15.7 kb)</a></li>
					</ul>
					
					<h4>Module by module</h4>
					<ul>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistant-2.0-modules.zip&amp;can=2&amp;q=#makechanges" title="Download DOMAssistant-2.0-modules.zip at Google code">All DOMAssistant modules ZIP file (8.8 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistant-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistant.js at Google code">DOMAssistant (4.2 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantAJAX-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistantAJAX.js at Google code">DOMAssistantAJAX (1.4 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantContent-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistantContent.js at Google code">DOMAssistantContent (3.3 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantCSS-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistantCSS.js at Google code">DOMAssistantCSS (2.5 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantEvents-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistantEvents.js at Google code">DOMAssistantEvents (2.2 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantLoad-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistantLoad.js at Google code">DOMAssistantLoad (2.1 kb)</a></li>
					</ul>
								
					<h3>Comments/updates</h3>
					<ul>
						<li><a href="http://www.robertnyman.com/2007/01/25/domass-the-dom-assistant/">First release blog post with comments and information</a></li>
						<li><a href="http://www.robertnyman.com/2007/09/20/releasing-domassistant-20-chainability-ajax-module-domready-xpath-and-more/">Version 2.0 release blog post with comments and information</a></li>
					</ul>
					
					<h3>Sign up for updates</h3>
					<p>Send an e-mail to domassistant [at] robertnyman [dot] com to verify your e-mail address and receive information about updates</p>
				
					<h3>Contact</h3>
					<ul>
						<li><a href="http://www.robertnyman.com/about">Contact the author</a></li>
					</ul>
				</div>	
				
			</div>		
		</div>
		
		<div id="footer">
			Created by Robert Nyman, <a href="http://www.robertnyman.com">http://www.robertnyman.com</a>
		</div>
		
	</div>
	
	<!-- Google Analytics code -->
	<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
	<script type="text/javascript">
		_uacct = "UA-56164-1";
		urchinTracker();
	</script>
	
	<!-- Start of StatCounter Code -->
	<script type="text/javascript">
	<!-- 
	var sc_project=593937; 
	var sc_partition=4; 
	var sc_security="175a1fec"; 
	//-->
	</script>
		
	<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a class="statcounter" href="http://www.statcounter.com/"><img class="statcounter" src="http://c5.statcounter.com/counter.php?sc_project=593937&amp;java=0&amp;security=175a1fec" alt="free geoip" /></a></div></noscript>
	<!-- End of StatCounter Code -->
	
	<!-- gVisit code -->
	<script type="text/javascript" src="http://www.gvisit.com/record.php?sid=de2c9dfeacdc0124bdb3fe3eab766832"></script>
	
</body>
</html>